package com.sqfw.project.learnRecord.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 学习录音评论表
 * @TableName LEARN_RECORD_COMMENT
 */
@TableName(value ="LEARN_RECORD_COMMENT")
@Data
public class LearnRecordComment implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 录音id
     */
    @TableField(value = "RECORD_ID")
    private Long recordId;

    /**
     * 用户id
     */
    @TableField(value = "USER_ID")
    private Long userId;

    /**
     * 留言内容
     */
    @TableField(value = "CONTENT")
    @NotBlank(message = "留言内容不能为空")
    private String content;

    /**
     * 留言父id
     */
    @TableField(value = "PARENT_ID")
    private Long parentId;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME")
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    private String createBy;

    /**
     * 子留言回复
     */

    @TableField(exist = false)
    private List<LearnRecordComment> replies;

    @TableField(exist = false)
    private Integer recordDuration;

    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
